<?php
$s['AddHead'] = '<link href="'.base_url().'css/mem/loginbox_v.css" rel="stylesheet" type="text/css" />';
$s['AddTitle']= "Activate your account";
$s['AddHeadJquery'] = '';
$this->load->view('mem/_header',$s);
?>
<div id="stylized" class="myform">
    <form id="form" name="form" method="post" action="<?=base_url()?>mem/sys/activate/<?=$this->uri->segment(4)?>">
        <h1>Login for activate</h1>
		<p>จะต้อง login ด้วยข้อมูลที่แจ้งมาใน email เพื่อเป็นการ activate account</p>
		<?php echo validation_errors('<div class="error-msg">', '</div>'); ?>
		<?php if(isset($errormsg)) echo '<div class="error-msg">'.$errormsg.'</div>'; ?>
		<?php
		if($cf['whatlogin']== 'user'){
			?>
			<label>
           ชื่อ Login<span class="mark">*</span><span class="small">Username ที่ใช้ในระบบ</span>
        </label>
        <span class="takeinput"><input type="text" name="username" id="username" <? if(isset($username)) echo 'value="'.$username.'" ';?>/><span id="resultuser"></span></span>
		<?
		}
		else
		{
			?>
			<label>
           Email<span class="mark">*</span><span class="small">Email ที่ติดต่อได้</span>
        </label>
        <span class="takeinput"><input type="text" name="email" id="email" <? if(isset($email)) echo 'value="'.$email.'" ';?>/><span id="resultemail"></span></span>
		<?
		}
		?>
        <label>
            รหัสผ่าน<span class="mark">*</span><span class="small">รหัสผ่าน</span>
        </label>
        <span class="takeinput"><input type="password" name="password" id="password" <? if(isset($password)) echo 'value="'.$password.'" ';?>/></span>		
		
		<label>
          <img src="<?=base_url()?>mem/sys/showimage/<?php echo md5(uniqid(time())); ?>" id="imgsec" /><span class="small">กรอกให้ตรงกับรูป <a href="#" onclick="document.getElementById('imgsec').src = '<?=base_url()?>mem/sys/showimage/' + Math.random(); return false">Reload Image</a></span>
        </label>
        <span class="takeinput">	<input type="text" name="p_images" id="p_images" <? if(isset($p_images)) echo 'value="'.$p_images.'" ';?>/></span>
		
	<label>.<span class="small"> </span></label>
		<span class="takeinput"><? echo form_submit('mysubmit', 'ส่งข้อมูล');?></span>
    </form>
<?php
$this->load->view('mem/_footer');
?>